package com.zxj.shop.admin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zxj.shop.admin.entity.Product;
import com.zxj.shop.admin.shiro.vo.ProductResponse;
import org.apache.ibatis.annotations.Select;

public interface ProductMapper  extends BaseMapper<Product> {

    @Select( "SELECT product.*,product_cate.`cat_name` FROM product INNER JOIN product_cate ON product.`product_cate_id` = product_cate.`id`")
    IPage<ProductResponse> page(Page<ProductResponse> objectPage);
}
